<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" 
%><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" 
%><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" 
%><%@ page contentType="text/html;charset=ISO-8859-1"
%><html:html locale="true">
    <head>
        <title><bean:message key="modalidad.title"/></title>
        <html:base/>
        <script type="text/javascript" src="../js/prototype.js"></script>
        <script type="text/javascript">
            function formatearPeriodo(){
                var i = 0;
                var numero;
                while(true){
                    if($('p'+i)){
                        numero = $('p'+i).innerHTML.substring(1);
                        if($('p'+i).innerHTML[0] == "t")
                            $('p'+i).innerHTML = "Trimestre " + numero;
                        if($('p'+i).innerHTML[0] == "v")
                            $('p'+i).innerHTML = "Verano " + numero;
                        if($('p'+i).innerHTML[0] == "p")
                            $('p'+i).innerHTML = "Pasant&iacute;a larga " + numero;
                        i++;
                    }else{
                        break;   
                    }       
                }
            }
            
        </script>
        <link rel="stylesheet" type="text/css" href="../css/style.css"></link>
<style type="text/css">
div#box30649 {width: 400px; margin: 40px auto; }
form#30649 {float: left; margin: 0; padding: 0; display: inline; width: 400px; }
form#30649 p {float: left; margin: 0; padding: 0; display: inline; }
form#30649 label {float: left; margin: 0; padding: 0; display: inline; overflow: hidden; }
form#30649 input {float: left; margin: 0; padding: 0; display: inline; }
  form#30649 p#30650_C {clear: both; width: 400px; }
  form#30649 p#30650_C label {clear: both; width: 400px; }
  form#30649 p#30650_C input {clear: both; width: 396px; }
  form#30649 p#30653_C {clear: both; width: 400px; }
  form#30649 p#30653_C label {clear: both; width: 400px; }
  form#30649 p#30653_C input {clear: both; width: 396px; }
  form#30649 p#30651_C {clear: both; width: 400px; }
  form#30649 p#30651_C label {clear: both; width: 400px; }
  form#30649 p#30651_C input {clear: both; width: 396px; }
  form#30649 p#30652_C {clear: both; width: 400px; }
  form#30649 p#30652_C label {clear: both; width: 400px; }
  form#30649 p#30652_C input {clear: both; width: 396px; }

</style>
    </head>
    <body onload="formatearPeriodo();">
        <div id="header">
            <div id="title"><bean:message key="modalidad.title"/></div>
            <div id="menu">
                <ul id="nav">
                    <li><html:link action="/ModalidadElim.do" paramId="idModalidad" paramName="idModalidad"><bean:message key="modalidad.label1"/></html:link></li>
                    <li>&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;</li>
                    <li><html:link action="/ModalidadPlanDeEstudiosCrearI.do" paramId="idPlan" paramName="idPlan"><bean:message key="modalidad.label2"/></html:link></li>
                    <li>&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;</li>
                    <li><html:link action="/PlanDeEstudiosI.do" paramId="idPlan" paramName="idPlan"><bean:message key="modalidad.label3"/></html:link></li>
                    <li>&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;</li>
                    <li><html:link action="/AsociacionModalidadCrearI.do" paramId="idModalidad" paramName="idModalidad"><bean:message key="modalidad.label5"/></html:link></li>

                </ul>
            </div>
        </div>
        <div id="body_wrapper">
            <div id="body">
                <div id="split">
                    <div class="top"></div>
                    <div id="left">
                        <div class="content">
                            ${empty msg ? "" : msg}
                            <div class="box30649"><html:form styleId="F30649" action="/ModalidadAct.do">
                                    <html:hidden property="idModalidad"/>
                                    <html:hidden styleId="30653" property="planDeEstudios"/>
                                    <table><tr>
                                    <td id="30653_C"><label for="30653"><bean:message key="FModalidad.label1"/></label></td><td>&nbsp;<html:text styleId="30653" property="nombre" size="30"/></td>
                                    </tr></table>
                  <html:submit styleClass="button"><bean:message key="modalidad.label0"/></html:submit>
                </html:form></div>
                <h2><bean:message key="modalidad.label4"/></h2>
                <table border="1">
                    <thead>
                        <tr>
                            <th>Requisito</th>
                            <th>Per&iacute;odo</th>

                        </tr>
                    </thead>
                    <tbody><% request.setAttribute("_vacio", new Object[0]); int c = 0;%>
                        <logic:iterate id="asociacion" collection="${empty L_Asociacion ? _vacio : L_Asociacion}">
                            <tr>
                                <td><html:link action="/AsociacionI.do" paramId="idAsociacion" paramName="asociacion" paramProperty="idAsociacion">${asociacion.requisito.asignatura.codigo}</html:link></td>
                                <td id="p<%=c++%>">${asociacion.periodoAbs}</td>

                            </tr>
                        </logic:iterate>
                    </tbody>
                </table>

                        </div>
                    </div>
                    <div id="right"><jsp:include page="/ppal/menu.jsp" flush="true"/></div>
                    <div class="clearer"></div>
                    <div class="bottom"></div>
                </div>
                <div class="clearer"></div>
            </div>
            <div class="clearer"></div>
        </div>
        <div id="end_body"></div>
        <h3 class="title"></h3>
        <div id="footer"> <bean:message key="bottom.label"/> </div>
        
    </body>
</html:html>